Re-order calls to put_gfn() around wait queue invocations
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Fri, 10 Feb 2012 16:07:07 +0000 (16:07 +0000)
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>
Fri, 10 Feb 2012 16:07:07 +0000 (16:07 +0000)
commit2981fb7d9dcbbe36228042fbf00618bb56ebafea
tree21e024a9049fee2493626b68116913b83d187025
parent99af3cd40b6e9fde63daddcec86ee5e6db338d94
Re-order calls to put_gfn() around wait queue invocations

Since we use wait queues to handle potential ring congestion cases,
code paths that try to generate a mem event while holding a gfn lock
would go to sleep in non-preemptible mode.

Most such code paths can be fixed by simply postponing event generation until
locks are released.

Signed-off-by: Adin Scannell <adin@scannell.ca>
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
13 files changed:
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/mm.c
xen/arch/x86/mm/guest_walk.c
xen/arch/x86/mm/hap/guest_walk.c
xen/arch/x86/mm/mem_access.c
xen/arch/x86/mm/mem_event.c
xen/arch/x86/mm/p2m.c
xen/common/grant_table.c
xen/common/memory.c
xen/include/asm-x86/mem_access.h
xen/include/asm-x86/mem_event.h
xen/include/asm-x86/p2m.h